<?php
/**
 * Notes:
 * Created by PhpStorm.
 * Author: TS
 * Date: 2019/10/12
 * Time: 13:05
 */

namespace app\validate;


use think\Validate;

class GroupChatValidate extends Validate
{
    protected $rule = [
        'group_chat_name' => 'require',
        'group_max' =>'require|in:5,10,100,200,300,500'
    ];

    protected $field = [
        'group_chat_id' => '群号',
        'user_id' => '群主',
        'group_chat_name' => '群名',
        'status' => '状态',
        'group_max' => '群规模'
    ];
    protected $message = [
        'group_max.in' => '群规模不符合'
    ];
    protected $scene = [
        'createGroup' => [
            'group_chat_name' => 'require',
            'group_max' =>'require|in:5,10,100,200,300,500'
        ],
        'upgrade' => [
            'group_max' =>'require|in:5,10,100,200,300,500'
        ],
        'update' => [
            'group_chat_name' => 'require',
        ],
    ];


}